﻿using furion.blog.Domain.Shared.ValidateAttribute;
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace furion.blog.Domain.Shared.Dto.TagConfig
{
    /// <summary>
    /// 标签更新
    /// </summary>
    public class TagConfigUpdateDto
    {
        [Required(ErrorMessage = "缺少ID")]
        public long TagId { get; set; }

        [Required(ErrorMessage = "请填写标签")]
        [JsonProperty(PropertyName = "tagLabel")]
        public string TagLabel { get; set; }

        [JsonProperty(PropertyName = "tagKey")]
        public string TagKey { get; set; }

        [JsonProperty(PropertyName = "groupKey")]
        [Required(ErrorMessage = "请选择类型")]
        [ValuesValidateAttribute(StrValues = new string[] { "System", "House", "Job", "HouseKeepingSkill" }, ErrorMessage = "类型有误")]
        public string GroupKey { get; set; }

        [JsonProperty(PropertyName = "status")]
        [ValuesValidateAttribute(StrValues = new string[] { "Normal", "Disable" }, ErrorMessage = "状态有误")]
        [Required(ErrorMessage = "请选择状态")]
        public string Status { get; set; }

        [JsonProperty(PropertyName = "icon")]
        [Required(ErrorMessage = "请上传图标")]
        public string Icon { get; set; } = string.Empty;

        public long UpdatedBy { get; set; }
        public DateTime UpdatedTime { get; set; } = DateTime.Now;
    }
}
